//
//  MainViewController.m
//  Yogofly
//
//  Created by Meracom on 6/20/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "MainViewController.h"
#import "BookRideViewController.h"
#import "FlatRateViewController.h"
#import "ContactUsViewController.h"
#import "BlogViewController.h"
#import "HelpViewController.h"
#import "MoreViewController.h"
#import "UINavigationBar+CustomImage.h"
#import "Utility.h"

@implementation MainViewController

@synthesize btnBookRide;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    [[Utility Shared] loadNavigationIOS5];
    //[self showViewBookRide];
    // Do any additional setup after loading the view from its nib.
}

- (void) viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [[self navigationController] setNavigationBarHidden:YES];

}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

- (IBAction)showViewBookRide:(id)sender{
    BookRideViewController *vcBookRide = [[BookRideViewController alloc] initWithNibName:@"BookRideViewController" bundle:nil];
    [self.navigationController pushViewController:vcBookRide animated:YES];
    [vcBookRide release];
}

- (IBAction)showViewFlatRate:(id)sender{
    FlatRateViewController *vcFlatRate = [[FlatRateViewController alloc] initWithNibName:@"FlatRateViewController" bundle:nil];
    [self.navigationController pushViewController:vcFlatRate animated:YES];
    [vcFlatRate release];
}

- (IBAction)showViewContactUs:(id)sender{
    ContactUsViewController *vcContactUs = [[ContactUsViewController alloc] initWithNibName:@"ContactUsViewController" bundle:nil];
    [self.navigationController pushViewController:vcContactUs animated:YES];
    [vcContactUs release];
}

- (IBAction)showViewBlog:(id)sender{
    BlogViewController *vcBlog = [[BlogViewController alloc] initWithNibName:@"BlogViewController" bundle:nil];
    [self.navigationController pushViewController:vcBlog animated:YES];
    [vcBlog release];
}

- (IBAction)showViewHelp:(id)sender{
    HelpViewController *vcHelp = [[HelpViewController alloc] initWithNibName:@"HelpViewController" bundle:nil];
    [self.navigationController pushViewController:vcHelp animated:YES];
    [vcHelp release];
}

- (IBAction)showViewMore:(id)sender{
    MoreViewController *vcMore = [[MoreViewController alloc] initWithNibName:@"MoreViewController" bundle:nil];
    [self.navigationController pushViewController:vcMore animated:YES];
    [vcMore release];
}

@end
